Object.defineProperty(exports, "__esModule", {
    value: !0
});

var e = require("../../utils/request"), o = require("../../utils/api"), t = require("../../utils/config");

Page({
    data: {
        themeColor: getApp().globalData.themeColor,
        cardNo: "",
        reservationNo: "",
        desc: "",
        show: !1
    },
    onLoad: function(a) {
        var r = this;
        console.log("detail", a), this.setData({
            reservationNo: a.reservationNo,
            cardNo: a.cardNo,
            show: !0
        }), e.request(e.HttpMethod.GET, o.apiRoute.getResvListFromCRS + a.reservationNo, {}).then(function(e) {
            console.log("req", o.apiRoute.getResvListFromCRS + a.reservationNo), console.log("res", e.code), 
            console.log(e.data), "20000" == e.code ? null != e.data && "0" != e.data.Status && "" != e.data.Status ? (r.setData({
                desc: ""
            }), t.getH5ResvDetailUrl().then(function(e) {
                var o = "".concat(e, "&cardNo=").concat(a.cardNo, "&hideTopBar=true&source=wechatAppletNew");
                wx.redirectTo({
                    url: "/pages/webview/webview?h5=".concat(encodeURIComponent(o)),
                    success: function() {}
                });
            })) : r.setData({
                desc: "您还未预约或已取消，请点击“查看已绑定体检卡”",
                show: !1
            }) : "50040" == e.code ? wx.redirectTo({
                url: "/pages/authorize/authorize?path=reservation-detail&cardNo=" + a.cardNo + "&reservationNo=" + a.reservationNo
            }) : r.setData({
                desc: "您还未预约或已取消，请点击“查看已绑定体检卡”",
                show: !1
            });
        });
    },
    search: function() {
        wx.redirectTo({
            url: "/pages/my-link-check/my-link-check"
        });
    },
    onPullDownRefresh: function() {
        wx.stopPullDownRefresh();
    },
    onClickShow: function() {
        this.setData({
            show: !0
        });
    },
    onClickHide: function() {
        this.setData({
            show: !1
        });
    },
    noop: function() {}
});